<?php
	get_header();
?>
<div id="post-0" class="post-0 page type-page status-publish hentry search-results">
	<div id="entry-header">
		<h1 id="entry-title"><?php echo __('Search results', "awisp.theme");?></h1>
	</div>
	<div id="entry-content">
		<?php
			if(have_posts()){
		?>
				<p><?php printf(_n('%1$d result for the query <q>%2$s</q>', '%1$d results for the query <q>%2$s</q>', $wp_query->found_posts, "awisp.theme"), $wp_query->found_posts, esc_html(get_search_query(false)));?></p>
		<?php
				echo awisp_posts_nav_links(get_next_posts_link(__('&larr; Older posts', "awisp.theme")), get_previous_posts_link(__('Newer posts &rarr;', "awisp.theme")));
				while(have_posts()){
					the_post();
					get_template_part("content", "post");
				}
				echo awisp_posts_nav_links(get_next_posts_link(__('&larr; Older posts', "awisp.theme")), get_previous_posts_link(__('Newer posts &rarr;', "awisp.theme")));
			}
			else{
		?>
				<p><?php printf(__('No results was found for the query <q>%s</q>.', "awisp.theme"), esc_html(get_search_query(false)));?></p>
				<p><?php echo __('Try to use other keywords or simplify your query.', "awisp.theme");?></p>
		<?php
			}
		?>
	</div>
</div>
<?php
	get_footer();
?>